# Maintainer: juergen <juergen@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=metalog
pkgver=3.0
pkgrel=3
pkgdesc="A modern replacement for syslogd and klogd"
url="http://metalog.sourceforge.net"
license=('GPL')
arch=('x86_64')
depends=('pcre')
provides=('logger')
backup=('etc/metalog.conf')
source=("http://sourceforge.net/projects/metalog/files/metalog-3.tar.xz/download" 'metalog.service')
md5sums=('6fe404e49764fa24108fd090417bacb5'
         '42b8138e8868ecdf0616f73efca7b339')

build() {
  cd $pkgname-3
  ./configure --prefix=/usr --sysconfdir=/etc --sbin=/usr/bin
  make
}

package() {
  cd $pkgname-3
  make DESTDIR="$pkgdir" install
  install -D -m644 metalog.conf "$pkgdir/etc/metalog.conf"
  install -Dm644 "${srcdir}"/metalog.service "${pkgdir}"/usr/lib/systemd/system/metalog.service
}
